package com.ruoyi.project.ums.service;

import java.time.LocalDateTime;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.ums.mapper.UmsFootprintMapper;
import com.ruoyi.db.ums.domain.UmsFootprint;
import com.ruoyi.db.ums.domain.query.UmsFootprintQueryVo;

/**
 * 浏览足迹Service业务层处理
 *
 * @author ruoyi
 * @date 2020-04-22
 */
@Service
public class UmsFootprintService
{
    @Autowired
    private UmsFootprintMapper umsFootprintMapper;

    /**
     * 查询浏览足迹
     *
     * @param id 浏览足迹ID
     * @return 浏览足迹
     */
    public UmsFootprint selectUmsFootprintById(Long id)
    {
        return umsFootprintMapper.selectUmsFootprintById(id);
    }

    /**
     * 查询浏览足迹列表
     *
     * @param umsFootprint 浏览足迹
     * @return 浏览足迹
     */
    public List<UmsFootprint> selectUmsFootprintList(UmsFootprintQueryVo umsFootprintQueryVo)
    {
        return umsFootprintMapper.selectUmsFootprintList(umsFootprintQueryVo);
    }

    /**
     * 新增浏览足迹
     *
     * @param umsFootprint 浏览足迹
     * @return 结果
     */
    public int insertUmsFootprint(UmsFootprint umsFootprint)
    {
        return umsFootprintMapper.insertUmsFootprint(umsFootprint);
    }

    /**
     * 修改浏览足迹
     *
     * @param umsFootprint 浏览足迹
     * @return 结果
     */
    public int updateUmsFootprint(UmsFootprint umsFootprint)
    {
        umsFootprint.setUpdateTime(LocalDateTime.now());
        return umsFootprintMapper.updateUmsFootprint(umsFootprint);
    }

    /**
     * 批量删除浏览足迹
     *
     * @param ids 需要删除的浏览足迹ID
     * @return 结果
     */
    public int deleteUmsFootprintByIds(Long[] ids)
    {
        return umsFootprintMapper.deleteUmsFootprintByIds(ids);
    }

    /**
     * 删除浏览足迹信息
     *
     * @param id 浏览足迹ID
     * @return 结果
     */
    public int deleteUmsFootprintById(Long id)
    {
        return umsFootprintMapper.deleteUmsFootprintById(id);
    }
}
